<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	<p:dialog widgetVar="promptBuscaProvas" modal="true" width="500"
		closable="true" header="Filtrar Provas" minWidth="500"
		>
		<h:form id="formpromptBuscaProvas">
			<div>
				<div class="prompt-div-label">Disciplina: </div>
				<div class="prompt-div-campo">
					<h:selectOneMenu value="#{realizarProvaBean.buscaDisciplina}"
						styleClass="ui-inputfield ui-widget ui-state-default ui-corner-all width_9">
						<f:selectItem itemLabel="Selecione..." itemValue="#{null}"/>
						<f:selectItems var="model" itemLabel="#{model.nome}" itemValue="#{model.id}" value="#{realizarProvaBean.disciplinaList}" />
					</h:selectOneMenu>
				</div>
				
				<div class="prompt-div-label">Professor: </div>
				<div class="prompt-div-campo">
					<h:selectOneMenu value="#{realizarProvaBean.buscaProfessor}"
						styleClass="ui-inputfield ui-widget ui-state-default ui-corner-all width_9">
						<f:selectItem itemLabel="Selecione..." itemValue="#{null}"/>
						<f:selectItems var="model" itemLabel="#{model.nomeCompleto}" itemValue="#{model.id}" value="#{realizarProvaBean.professorList}" />
					</h:selectOneMenu>
				</div>
				
				<div class="prompt-div-label">Ano/Semestre: </div>
				<div class="prompt-div-campo">
					<h:selectOneMenu value="#{realizarProvaBean.buscaAno}"
						styleClass="ui-inputfield ui-widget ui-state-default ui-corner-all width_3"
						converter="javax.faces.DateTime">
						<f:selectItem itemLabel="Selecione..." itemValue="#{null}"/>
						<f:selectItems value="#{ofertaDisciplinaBean.anosList}" />
					</h:selectOneMenu>
					<p:spacer width="2" height="1" />
					/
					<p:spacer width="2" height="1" />
					<h:selectOneMenu
						value="#{realizarProvaBean.buscaSemestre}"
						styleClass="ui-inputfield ui-widget ui-state-default ui-corner-all width_2">
						<f:selectItem itemLabel="..." itemValue="#{null}"/>
						<f:selectItem itemLabel="01" itemValue="1" />
						<f:selectItem itemLabel="02" itemValue="2" />
					</h:selectOneMenu>
				</div>
			</div>
 			<div style="text-align: right;">
           		<br/><p:separator /><br/>  
                <p:commandButton action="#{realizarProvaBean.filtrarProvas}" value="Filtrar" update="formPrincipal" onclick="promptBuscaProvas.hide()" />
                <p:commandButton type="button" value="Cancelar" onclick="promptBuscaProvas.hide()"/>
            </div>
		</h:form>
	</p:dialog>
</f:view>